package com.example.home.api

import com.example.common.api.BaseApiService
import com.example.common.entity.BaseResponse
import com.example.common.entity.CommendEntity
import com.example.common.entity.SimpleVideoEntity
import com.example.home.entity.SimpleTypeEntity
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface HomeApiServer:BaseApiService {
    @GET("/videotype/getSimpleType")
    suspend fun getSimpleType():BaseResponse<List<SimpleTypeEntity>>

    @GET("/videosimple/getRecommendSimpleVideo")
    suspend fun getRecommendSimpleVideo(@Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<SimpleVideoEntity>>

    @GET("/videosimple/getSimpleVideoByChannelId")
    suspend fun getSimpleVideoByChannelId(@Query("channelId") channelId: String ,@Query("page") page: Int, @Query("pagesize") pageSize: Int): BaseResponse<List<SimpleVideoEntity>>

    @GET("/comment/getCommentByUserId")
    suspend fun getVideoCommends(@Query("datatype") dataType: Int, @Query("itemid") itemId: String): BaseResponse<List<CommendEntity>>

    @POST("/comment/publishComment")
    suspend fun publishVideoComment(@Body requestBody: RequestBody): BaseResponse<List<CommendEntity>>


}